//
//  ViewController.h
//  外星球生活圈
//
//  Created by MR.ZHOU on 15/8/12.
//  Copyright (c) 2015年 MR.ZHOU. All rights reserved.
//
#import "DSNewsViewController.h"

@interface DSNewsViewController ()

@end

@implementation DSNewsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.titleLabel.text = @"热点";
    [self getData];
    [DSFunction saveBoolWithBoolean:YES withKey:@""];
}

- (void)getData{
    
    
    //用于存放参数
    NSMutableDictionary *param = [NSMutableDictionary dictionary];
    
    [param setObject:@"38" forKey:@"lon"];
    
    [param setObject:@"120" forKey:@"lat"];
    
    //时间戳
    //2015-08-10 11:19:00
    
    
    [param setObject:[DSFunction getTimeScamp] forKey:@"time"];
    
    //MD5参数
    NSArray *array = @[ APP_ID,param[@"lon"],param[@"lat"],param[@"time"],APP_IDENGER];
    [param setObject:[DSFunction md5StringFromArray:array] forKey:@"sign"];
    
    [param setObject:APP_ID forKey:@"app_id"];
    // http://www.itcast.cn?
    //name:itcast
    //passwrod:123
    [DSHTTPClient DSGET:kURLGETHomeInfo withParam:param withSuccessBlock:^(id data) {
        
        
      
        NSLog(@"");
        
        
        
    } withFailedBlock:^(NSError *error) {
        
        NSLog(@"");
        
    } withErrorBlock:^(id error) {
        NSLog(@"");
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
